extends Node2D


@onready var white = $white
@onready var lable = $Label
@onready var lable2 = $Label2
@onready var bgm = $AudioStreamPlayer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	bgm.stop()
	white.hide()
	lable.hide()
	lable2.hide()
	GameUtiles.player_bag = {}
	GameUtiles.ingredients = []
	SeManager.play_magic()
	await get_tree().create_timer(3.0).timeout
	DialogueManager.show_dialogue_balloon(load("res://dialogues/dia_in_levels/end.dialogue"),"home")
	await get_tree().create_timer(3.0).timeout
	bgm.play()

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if GameUtiles.over:
		white.show()
		await get_tree().create_timer(2.0).timeout
		lable2.show()
	if GameUtiles.over:
		await get_tree().create_timer(2.0).timeout
		lable.show()
		
